public class GoldCardMember extends Member {
    private double totalCost = 0.0;

    public GoldCardMember(String info) {
        super(info);
    }

    @Override
    public double consume(double amount) {
        double actualPayment;
        
        if (amount <= 2000) {
            actualPayment = amount;
        } else if (amount <= 5000) {
            actualPayment = amount * 0.95;
        } else if (amount <= 10000) {
            actualPayment = amount * 0.90;
        } else if (amount <= 20000) {
            actualPayment = amount * 0.85;
        } else {
            actualPayment = amount * 0.80;
        }
        
        totalCost += actualPayment;
        return actualPayment;
    }

    @Override
    public double getTotalCost() {
        return totalCost;
    }

    @Override
    public String toString() {
        return "GoldCardMember: " + super.toString();
    }
} 